<template>
	<view>
		<uni-list>
			<uni-list-item v-for="(item,index) in data" :key="index" :title="item.name+item.phone+item.address+item.add" showArrow clickable @tap="todetail(item)"></uni-list-item>
		</uni-list>
		<button type="primary" style="background-color: #fa436a; font-size: 36rpx; margin-top: 600rpx; width: 400rpx;height: 90rpx; border-radius: 40rpx;" @click="toXinzeng">新增收货地址</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data:[
					{name:"杨紫薇",phone:"13313535620",address:"天津天津市西青区",add:"宾水西道天津市大学软件学院"},
					{name:"赵嘻嘻",phone:"13313535620",address:"天津天津市西青区",add:"宾水西道天津市大学软件学院"},
					{name:"王子木",phone:"13313535620",address:"天津天津市西青区",add:"宾水西道天津市大学软件学院"},
					{name:"李国傲",phone:"13313535620",address:"天津天津市西青区",add:"宾水西道天津市大学软件学院"}
				]
			};
		},
	
		methods:{
			todetail(x){
				uni.showToast({
					title:x.name
				});
				uni.navigateBack({
				    delta: 2
				});
				uni.$emit('sendTitle',{cname:x.name,cphone:x.phone,caddress:x.address,cadd:x.add})
			},
			toXinzeng(){
				uni.navigateTo({
					url:'../address/address'
				})
			}
		}
		
	
	}

</script>

<style>
	
</style>
